<div ng-include="'/modules/template/header.html'"></div>

<div class="weizhi">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 t_weizhi">
                当前位置->><a ui-sref="main">首页</a>->><a ui-sref="register_information">个人中心</a>->><a>密码修改</a>
            </div>
        </div>
    </div>
</div>
  
<div class="t_main tt_main">
	<div class="container">
    	<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 0;">
				<div ng-include="'/modules/template/member_center_menu.html'"></div>  
				<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 up_form_box">
				    <div class="ttbox" style="text-align: center;">
			            <form name="myForm">
				            <div class="ttb-top">
	                            <div class="tt_title"><span>密码修改</span></div>
	                        </div>
		                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 zc_main_1" style="margin-top:50px;">
                                   <span class="nav-2">旧密码</span>
                                   <input type="password" name="oldPassword" ng-model="oldPassword" ng-pattern="/^[a-z0-9]*$/" ng-required="true" ng-minlength="6" maxlength="32">
                                   <div class="row" style="width: 258px;margin: 5px auto;margin-top: 15px;">
                                       <div ng-show="myForm.oldPassword.$dirty && myForm.oldPassword.$error.minlength"
                                                class="alert alert-danger help-block nav-1">
                                               不能少于6个字符
                                       </div>
                                       <div ng-show="myForm.oldPassword.$dirty && myForm.oldPassword.$error.required"
                                                class="alert alert-danger help-block nav-1">
                                               密码不能为空
                                       </div>
                                       <div ng-show="myForm.oldPassword.$dirty && myForm.oldPassword.$error.pattern"
                                                   class="alert alert-danger help-block">
                                               密码是数字或字母
                                       </div>
                                   </div>
                               </div>
		                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 zc_main_1">
		                        <span class="nav-2">新密码</span>
		                        <input type="password" name="newPassword" ng-model="newPassword" ng-pattern="/^[a-z0-9]*$/" ng-required="true" ng-minlength="6" maxlength="32">
		                        <div class="row" style="width: 258px;margin: 5px auto;margin-top: 15px;">
		                            <div ng-show="myForm.newPassword.$dirty && myForm.newPassword.$error.minlength"
		                                     class="alert alert-danger help-block nav-1">
		                                    不能少于6个字符
		                            </div>
		                            <div ng-show="myForm.newPassword.$dirty && myForm.newPassword.$error.required"
		                                     class="alert alert-danger help-block nav-1">
		                                    密码不能为空
		                            </div>
		                            <div ng-show="myForm.newPassword.$dirty && myForm.newPassword.$error.pattern"
		                                        class="alert alert-danger help-block">
		                                    密码是数字或字母
		                            </div>
		                        </div>
		                    </div>
		                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 zc_main_1">
		                        <span class="nav-1">确认密码</span>
		                        <input type="password" name="confNewPassword" ng-model="confNewPassword" ng-required="true" maxlength="32">
		                        <div class="row" style="width: 258px;margin: 5px auto;margin-top: 15px;">
		                            <div ng-show="myForm.confNewPassword.$dirty && (confNewPassword !== newPassword)" class="alert alert-danger help-block">
		                                两次密码不一致
		                            </div>
		                        </div>
		                    </div>
		                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 zc_main_1" ng-class="{'zc_main_ac' : myForm.$valid && (confNewPassword === newPassword)}">
		                        <button type="button" ng-click="updateUserPassword()" ng-disabled="myForm.$invalid" style="margin-left:50px; float:right;">修改</button>
		                    </div>
		                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 zc_main_1">
                                <button type="button" ui-sref="register_information"  style="margin-left:20px; float:left; background-color: #5bc0de; color: #fff;">返回</button>
                            </div>               
			            </form>
			        </div>
			    </div>
			</div>
	     </div>
    </div>
</div>